package Dict;

/**
 * Enum definition: PropTransValue.
 *
 * @author OpenORB Compiler
*/
public final class PropTransValue implements org.omg.CORBA.portable.IDLEntity
{
    /**
     * Enum member TRANS value 
     */
    public static final int _TRANS = 0;

    /**
     * Enum member TRANS
     */
    public static final PropTransValue TRANS = new PropTransValue(_TRANS);

    /**
     * Enum member INTR value 
     */
    public static final int _INTR = 1;

    /**
     * Enum member INTR
     */
    public static final PropTransValue INTR = new PropTransValue(_INTR);

    /**
     * Internal member value 
     */
    private final int _PropTransValue_value;

    /**
     * Private constructor
     * @param  the enum value for this new member
     */
    private PropTransValue( final int value )
    {
        _PropTransValue_value = value;
    }

    /**
     * Maintains singleton property for serialized enums.
     * Issue 4271: IDL/Java issue, Mapping for IDL enum.
     */
    public java.lang.Object readResolve() throws java.io.ObjectStreamException
    {
        return from_int( value() );
    }

    /**
     * Return the internal member value
     * @return the member value
     */
    public int value()
    {
        return _PropTransValue_value;
    }

    /**
     * Return a enum member from its value.
     * @param value An enum value
     * @return An enum member
         */
    public static PropTransValue from_int( int value )
    {
        switch ( value )
        {
        case 0:
            return TRANS;
        case 1:
            return INTR;
        }
        throw new org.omg.CORBA.BAD_OPERATION();
    }

    /**
     * Return a string representation
     * @return a string representation of the enumeration
     */
    public java.lang.String toString()
    {
        switch ( _PropTransValue_value )
        {
        case 0:
            return "TRANS";
        case 1:
            return "INTR";
        }
        throw new org.omg.CORBA.BAD_OPERATION();
    }

}
